package collector;

import java.io.IOException;

import database.DatabaseProxy;

import extractor.StatusData;

public class DatabaseStatusSaver extends StatusListener{

	// DB Proxy
	private DatabaseProxy db;
	
	public DatabaseStatusSaver(DatabaseProxy db){
		this.db = db;
	}
	
	@Override
	public boolean validate(StatusData data) {
		//System.out.println("validate");
		return true;
	}

	@Override
	public void process(StatusData data) throws IOException {
		//System.out.println("process");
		db.writeStatusData(data);
		
	}


}
